<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><s:text name="title"/></title>
<link href="<%=request.getContextPath()%>/stage/css/inside.css" rel="stylesheet" type="text/css" />
<script type="text/javascript"
	src="<%=request.getContextPath()%>/stage/js/jquery-1.4.2.min.js"></script>

<link href="<%=request.getContextPath()%>/stage/css/niutuku.css" type="text/css" rel="stylesheet"/>	
<script src="<%=request.getContextPath()%>/stage/js/niutuku.base.js" type=text/javascript></script>
<script src="<%=request.getContextPath()%>/stage/js/niutuku.lib.js" type=text/javascript></script>
<script src="<%=request.getContextPath()%>/stage/js/niutuku.js" type=text/javascript></script>

<script type="text/JavaScript">
<!--
$(document).ready(function() {
	   $(".jqzoom").jqueryzoom({
			xzoom:300,
			yzoom:300,
			offset:10,
			position:"right",
			preload:1,
			lens:1
		});
		$("#spec-list").jdMarquee({
			deriction:"left",
			width:248,
			height:56,
			step:2,
			speed:4,
			delay:10,
			control:true,
			_front:"#spec-right",
			_back:"#spec-left"
		});
		$("#spec-list img").bind("mouseover",function(){
			var src=$(this).attr("src");
			$("#spec-n1 img").eq(0).attr({
				src:src.replace("\/n5\/","\/n1\/"),
				jqimg:src.replace("\/n5\/","\/n0\/")
			});
			$(this).css({
				"border":"2px solid #ff6600",
				"padding":"1px"
			});
		}).bind("mouseout",function(){
			$(this).css({
				"border":"1px solid #ccc",
				"padding":"2px"
			});
		});	
		
	$("#matselect").change(function(){
		var index=$("#matselect").get(0).selectedIndex;
		if(0==index){price=k18Price;myWeight=k18Weight;type='0';}
		if(1==index){price=pt900Price;myWeight=pt900Weight;type='1';}
		if(2==index){price=pt950Price;myWeight=pt950Weight;type='2';}
		price=Math.floor(price);
		$("#priceFormate").html(price);
		$("#weightFormate").html(myWeight);
		$("#price").val(price);
		$("#midPrice").val(type);
		
	});
	var k18Price=<s:property value="inlayDiamondBo.k18PriceFormat"/>;
	var pt900Price=<s:property value="inlayDiamondBo.pt900PriceFormat"/>;
	var pt950Price=<s:property value="inlayDiamondBo.pt950PriceFormat"/>;
	
	var k18Weight=<s:property value="inlayDiamondBo.k18Weight"/>;
	var pt900Weight=<s:property value="inlayDiamondBo.pt900Weight"/>;
	var pt950Weight=<s:property value="inlayDiamondBo.pt950Weight"/>;
	
	var price=Math.floor(k18Price);
	var myWeight=k18Weight;
	var type='0';
	$("#priceFormate").html(price);
	$("#weightFormate").html(myWeight);
	$("#price").val(price);
	$("#midPrice").val(type);
	
	$("#handSizeDiv").hide();
	var inlayDiaType='<s:property value="inlayDiamondBo.inlayType"/>';
	if(inlayDiaType=='女戒'||inlayDiaType=='男戒'){
		$("#handSizeDiv").show();
	}
	
})
function toOrder(){
	var orderNo='<%=session.getAttribute("orderNo")%>';
	if(orderNo=='null'||orderNo.length<1){
		alert("请先选择钻石!");
		return false;
	}
	var r=confirm("确认是否提交到编号为:"+orderNo+"的订单.");
	if (r==true){
		return true;
	}
	return false;
}
//-->
</script>
</head>

<body onload="MM_preloadImages('<%=request.getContextPath()%>/stage/images/menu0_01.jpg','<%=request.getContextPath()%>/stage/images/menu0_02.jpg','<%=request.getContextPath()%>/stage/images/menu0_03.jpg','<%=request.getContextPath()%>/stage/images/menu0_04.jpg','<%=request.getContextPath()%>/stage/images/menu0_05.jpg','<%=request.getContextPath()%>/stage/images/menu0_06.jpg','<%=request.getContextPath()%>/stage/images/menu0_07.jpg')">
<div class="mainbody">
<%@ include file="head1.jsp"%>
 <div class="intermediate">
    <h1>当前位置：首页&nbsp;&gt;&nbsp;<b><FONT COLOR="#FFCC66">钻托明细</FONT></b></h1>
<%@ include file="left.jsp"%>
    <div class="right">
    	<form action="<%=request.getContextPath()%>/addinlay.action" method="post" onsubmit="javascript:return toOrder();">
         <h4><img src="<%=request.getContextPath()%>/stage/images/xzzt/xzzt.png" width="132" height="16" /></h4>
		 <div class="jgkz_bt">
		    <ul>
		       <li><img src="<%=request.getContextPath()%>/stage/images/xzzt/xzzt_03.jpg" width="87" height="29" /></li>
			   <li><img src="<%=request.getContextPath()%>/stage/images/zscx/zscx_14.jpg" width="35" height="29" /></li>
			   <li><img src="<%=request.getContextPath()%>/stage/images/xzzt/xzzt_05.jpg" width="87" height="29" /></li>
			   <li><img src="<%=request.getContextPath()%>/stage/images/zscx/zscx_14.jpg" width="35" height="29" /></li>
			   <li><img src="<%=request.getContextPath()%>/stage/images/zscx/zscx_11.jpg" width="87" height="29" /></li>
           </ul>
	  </div>
      <div class="xztz_ny">
      	<div id=preview>
			<div class=jqzoom id=spec-n1 >
				<IMG height=250 width=250 src="<s:text name="web_pic"/>/<s:property value="inlayDiamondBo.picture"/>" jqimg="<s:text name="web_pic"/>/<s:property value="inlayDiamondBo.picture"/>" >
			</div>
		<div id=spec-n5>
			<div class=control id=spec-left>
				<img src="<%=request.getContextPath()%>/stage/images/left.gif" />
			</div>
			<div id=spec-list>
				<ul class=list-h>
				<li><img src="<s:text name="web_pic"/>/<s:property value="inlayDiamondBo.picture"/>"/></li>
			 	<s:iterator value="dataList" status="u">
		    		<li><img src="<s:text name="web_pic"/>/<s:property value="picLine"/>"/></li>
		    	</s:iterator>
				</ul>
			</div>
			<div class=control id=spec-right>
				<img src="<%=request.getContextPath()%>/stage/images/right.gif" />
			</div>
		
    	</div>
		</div>
      
		 <div class="jgkz_right_inlay">
		     <ul>
		     	<li>钻托名称：<s:property value="inlayDiamondBo.inlayName"/></li>
			    <li>钻托价格：<span id="priceFormate"></span></li>
			    <li>钻托重量：<span id="weightFormate"></span></li>
				<li>钻托类型：<s:property value="inlayDiamondBo.inlayType"/></li>
				<li>钻托镶钻：<s:property value="inlayDiamondBo.diaBatch"/></li>
				<li>钻托编号：<s:property value="inlayDiamondBo.inlayNumber"/></li>
				<li>选择材质：
					<select  id="matselect" name="detail.material">  
		     			<option value="18K">18K</option> 
           				<option value="PT900">PT900</option>   
           				<option value="PT950">PT950</option>
        			</select>
				
				</li>
				<li><div id="handSizeDiv">
					输入手寸：
					<input id="text" name="detail.hand" type="text" class="kuang1" maxlength="5" onKeypress="return (/[\d.]/.test(String.fromCharCode(event.keyCode)))"/>寸
					</div>
				</li>
				<li>钻托字印：
					<input id="text" name="detail.text" type="text" class="sous1" maxlength="20"/></li>
				<li>
					<input type="hidden" name="detail.inlayDiamondId" value="<s:property value="inlayDiamondBo.inlayDiamondId"/>" type="text"/>
					<input type="hidden" name="detail.price" id="price" type="text"/>
					<input type="hidden" name="detail.midPrice" id="midPrice" type="text"/>
				</li>
				<li></li>
				<li>
				  <label>
				  <input type="image" src="<%=request.getContextPath()%>/stage/images/zscx/order1.gif" />
				  </label>
				  <label>
				 	 <a href="<%=request.getContextPath()%>/toinlay.action"><img src="<%=request.getContextPath()%>/stage/images/zscx/cxxk1.gif" border="0"/></a>
				  </label>
				</li>
			 </ul>
	    </div>
	  </div>
	  </form>
    </div>
 </div>
 <%@ include file="foot.jsp"%>
</div>
</body>
</html>
